package com.itheima.eurekafeignclient.service;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Service;
import org.springframework.web.bind.annotation.*;
import com.itheima.eurekafeignclient.entity.User;

@FeignClient(name="eureka-provider")
@Service
public interface FeignService {

    @RequestMapping(value = "/hello", method = RequestMethod.GET)
    public String hello();

    @RequestMapping(value = "/hello1",method = RequestMethod.GET)
    public String hello(@RequestParam String name);
    @RequestMapping(value = "/hello2",method = RequestMethod.GET)
    public User hello(@RequestParam String name, @RequestHeader Integer age);
    @RequestMapping(value = "/hello3", method = RequestMethod.POST)
    String hello(@RequestBody User user);
}
